package com.ruoyi.tplus.util;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: zhanglm
 * @CreateDate: 2025-02-28 10:31
 * @FullNameClass: com.ruoyi.kis.util.KisJsonUtil
 * @Description:
 */
public class KisJsonUtil {
    public static String toJsonString(List list) throws JsonProcessingException {
        if (list != null && list.size() > 0) {
            Map<String, Object> jsonMap = new HashMap<>();
//            jsonMap.put("FEntity", list);
            ObjectMapper mapper = new ObjectMapper();
            String jsonString = mapper.writeValueAsString(jsonMap);
            return jsonString;
        }
        return null;
    }
}
